FROM britesnow/base-node:23-02-10

# the procps is for command pgrep when restart
RUN apt-get -y update \
	&& apt-get -y install procps \
	&& apt-get -y install file

RUN mkdir /service

WORKDIR /service

COPY package.json ./
RUN npm install
COPY . .

# To make sure to have the same environments as as kexec (for ss3 for example)
ENTRYPOINT [ "/bin/bash", "-c", "source ~/.bashrc && /service/entrypoint.sh ${@}", "--" ]